<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <form action="" method="post" enctype="multipart/form-data">
    <input type="file" name="file" id="">
  </form>
  <script>
    var name = '木婷婷';
    // 转码
    console.log(encodeURI(name));
    var code = "%E5%A9%B7";
    // 解码
    console.log(decodeURI(code));
  </script>
</body>
</html>